<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1.Object.is 判断两个值是否完全相等
        console.log(Object.is(120,120))  //true
        console.log(Object.is(NaN,NaN))  //false
    
        //2.Object.assign 对象的合并
        const a = {
            name:'ran',
            age:12
        }
        const b = {
            pass:'i love you'
        }
        console.log(Object.assign(a,b))   //{name:'ran',age:'12',pass:'i love you'}
    
        //3.Object.setPrototypeOf 设置原型对象 Object.getPrototypeof
        const school = {
            name:'尚硅谷'
        }
        const cities = {
            xiaoqu:['北京','上海']
        }
        Object.setPrototypeOf(school,cities)
        console.log(Object.getPrototypeOf(school))  //{xiaoqu: Array(2)}
        console.log(school)  //{name: "尚硅谷"}
    </script>
    
</body>
</html>